package xiao.ke.serviceinvoker1.service;/**
 * @author XuXiaoK
 * @create 2020-01-20 14:12
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 *@Author XiaoKe
 *@Date 2020/1/20 14:12
 *@Description TODO
 */
@Service
public class HelloService {

    @Autowired
    RestTemplate restTemplate;

    public String hiService(String name) {
        return restTemplate.getForObject("http://service-provider1/hi?name="+name,String.class);
    }

    public String router() {
        return restTemplate.getForObject("http://service-provider1//person/1", String.class);
    }

}
